package com.kgc.repository;

import com.kgc.document.Ticket;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.solr.core.query.result.HighlightPage;
import org.springframework.data.solr.repository.Highlight;
import org.springframework.data.solr.repository.SolrCrudRepository;

import java.util.List;

public interface TicketRepository extends SolrCrudRepository<Ticket,String> {
    int countByTitle(String content);
    @Highlight(prefix = "<font color='red'>",postfix = "</font>")
    HighlightPage<Ticket> findByTitle(String title, PageRequest pageRequest);

}
